Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to remove the RetryPolicy from the workflow context without overriding the other existing ActivityOptions in it #1418

Closed

Conversation

kittinanasi
Copy link

The WithRetryPolicy function accepts a pointer receiver RetryPolicy parameter, so it can be used to remove the RetryPolicy from the ActivityOptions.

I set the ActivityOptions including a non-nil RetryOptions configuration at the beginning of my workflow, these ActivityOptions are used by all activities in my workflow by default. I would like to override the RetryPolicy to nil for just one activity in that workflow without overriding the other ActivityOptions configurations.

I added a unit test.

When users set a retryPolicy with the WithRetryPolicy function, it could be broken, so the workflow might not be retried even if the RetryPolicy is set.

…ithout overriding the other existing ActivityOptions in it
@shijiesheng
Copy link
Member

This is a breaking change. It's better to add WithoutRetryPolicy to actually remove it. Also passing a nil pointer as function input is bad practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants